import http from "@/utils/http";
import { AxiosRequestConfig } from "axios";

export interface GetFindOne_ {
  /**
   * @description pageCode
   */
  pageCode: string;
}

export class UserPageFilterSetting {
  /**
   * 查看某个页面的筛选条件配置信息
   *
   * @tags 用户页面筛选条件配置信息
   * @request GET: /userPageFilterSetting/findOne
   * @secure
   */
  getFindOne = (query: { pageCode: string } | GetFindOne_, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntity>({
      url: `/userPageFilterSetting/findOne`,
      method: "GET",
      params: query,
      ...params,
    });

  /**
   * 查询所有页面配置信息
   *
   * @tags 用户页面筛选条件配置信息
   * @request GET: /userPageFilterSetting/list
   * @secure
   */
  getList = (params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntityListUserPageFilterSettingVO>({
      url: `/userPageFilterSetting/list`,
      method: "GET",
      ...params,
    });

  /**
   * 编辑单个页面筛选条件配置信息
   *
   * @tags 用户页面筛选条件配置信息
   * @request POST: /userPageFilterSetting/update
   * @secure
   */
  postUpdate = (vo: defs.UserPageFilterSettingVO, params: AxiosRequestConfig = {}) =>
    http.request<defs.ResponseEntity>({
      url: `/userPageFilterSetting/update`,
      method: "POST",
      data: vo,
      ...params,
    });
}

export default new UserPageFilterSetting();
